package cn.initcap.designpattern.pattern.structural.decorator;

/**
 * @author initcap
 * @date 2018/8/28 AM9:13
 */
public class EggDecorator extends AbstractDecorator {

    EggDecorator(AbstractBattercake abstractBattercake) {
        super(abstractBattercake);
    }

    @Override
    protected void doSomething() {
        System.out.println("添加鸡蛋啦！");
    }

    @Override
    protected String getDesc() {
        return super.getDesc() + " 加一个鸡蛋";
    }

    @Override
    protected int cost() {
        return super.cost() + 1;
    }
}
